using GCNF.Algorithm.MinimumActivity;
using System;
using Xunit;

namespace TestProject_GCNF.Algorithm.MinimumActivity
{
    public class UnitTest1
    {
        private AbstractLeastActive abstractLeastActive = new LeastActive();
        [Fact]
        public void Test1()
        {
            abstractLeastActive.keyValuePairs.TryAdd("http://localhost:8080", 0); 
            abstractLeastActive.keyValuePairs.TryAdd("http://localhost:8082", 1);
            abstractLeastActive.keyValuePairs.TryAdd("http://localhost:8081", -1);
            abstractLeastActive.keyValuePairs.TryAdd("http://localhost:8083", -1);
            string value = abstractLeastActive.GetValue();
            abstractLeastActive.Dispose(value);
            Assert.Equal("http://localhost:8083", value);
        }
    }
}
